home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / jpeglib5b / readme < prev    next >
Text File  |  1980-01-12  |  18KB  |  359 lines

  1. The Independent JPEG Group's JPEG software
  2. ==========================================
  3.  
  4. README for release 5b of 15-Mar-95
  5. ==================================
  6.  
  7. This distribution contains the fifth public release of the Independent JPEG
  8. Group's free JPEG software.  You are welcome to redistribute this software and
  9. to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
  10.  
  11. Serious users of this software (particularly those incorporating it into
  12. larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to
  13. our electronic mailing list.  Mailing list members are notified of updates
  14. and have a chance to participate in technical discussions, etc.
  15.  
  16. This software is the work of Tom Lane, Philip Gladstone, Luis Ortiz, Jim
  17. Boucher, Lee Crocker, George Phillips, Davide Rossi, Ge' Weijers, and other
  18. members of the Independent JPEG Group.
  19.  
  20. IJG is not associated with the official ISO JPEG standards committee.
  21.  
  22.  
  23. DOCUMENTATION ROADMAP
  24. =====================
  25.  
  26. This file contains the following sections:
  27.  
  28. OVERVIEW            General description of JPEG and the IJG software.
  29. LEGAL ISSUES        Copyright, lack of warranty, terms of distribution.
  30. REFERENCES          Where to learn more about JPEG.
  31. ARCHIVE LOCATIONS   Where to find newer versions of this software.
  32. RELATED SOFTWARE    Other stuff you should get.
  33. FILE FORMAT WARS    Software *not* to get.
  34. TO DO               Plans for future IJG releases.
  35.  
  36. Other documentation files in the distribution are:
  37.  
  38. User documentation:
  39.   install.doc       How to configure and install the IJG software.
  40.   usage.doc         Usage instructions for cjpeg, djpeg, rdjpgcom, wrjpgcom.
  41.   *.1               Unix-style man pages for programs (same info as usage.doc).
  42.   change.log        Version-to-version change highlights.
  43. Programmer and internal documentation:
  44.   libjpeg.doc       How to use the JPEG library in your own programs.
  45.   example.c         Sample code for calling the JPEG library.
  46.   structure.doc     Overview of the JPEG library's internal structure.
  47.   filelist.doc      Road map of IJG files.
  48.   coderules.doc     Coding style rules --- please read if you contribute code.
  49.  
  50. Please read at least the files install.doc and usage.doc.  Useful information
  51. can also be found in the JPEG FAQ (Frequently Asked Questions) article.  See
  52. ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
  53.  
  54. If you want to understand how the JPEG code works, we suggest reading one or
  55. more of the REFERENCES, then looking at the documentation files (in roughly
  56. the order listed) before diving into the code.
  57.  
  58.  
  59. OVERVIEW
  60. ========
  61.  
  62. This package contains C software to implement JPEG image compression and
  63. decompression.  JPEG (pronounced "jay-peg") is a standardized compression
  64. method for full-color and gray-scale images.  JPEG is intended for compressing
  65. "real-world" scenes; cartoons and other non-realistic images are not its
  66. strong suit.  JPEG is lossy, meaning that the output image is not necessarily
  67. identical to the input image.  Hence you must not use JPEG if you have to have
  68. identical output bits.  However, on typical images of real-world scenes, very
  69. good compression levels can be obtained with no visible change, and amazingly
  70. high compression levels are possible if you can tolerate a low-quality image.
  71. For more details, see the references, or just experiment with various
  72. compression settings.
  73.  
  74. We provide a set of library routines for reading and writing JPEG image files,
  75. plus two simple applications "cjpeg" and "djpeg", which use the library to
  76. perform conversion between JPEG and some other popular image file formats.
  77. The library is intended to be reused in other applications.
  78.  
  79. This software implements JPEG baseline and extended-sequential compression
  80. processes.  Provision is made for supporting all variants of these processes,
  81. although some uncommon parameter settings aren't implemented yet.  For legal
  82. reasons, we are not distributing code for the arithmetic-coding process; see
  83. LEGAL ISSUES.  At present we have made no provision for supporting the
  84. progressive, hierarchical, or lossless processes defined in the standard.
  85. (Support for progressive mode will be offered in a future release.)
  86.  
  87. In order to support file conversion and viewing software, we have included
  88. considerable functionality beyond the bare JPEG coding/decoding capability;
  89. for example, the color quantization modules are not strictly part of JPEG
  90. decoding, but they are essential for output to colormapped file formats or
  91. colormapped displays.  These extra functions can be compiled out of the
  92. library if not required for a particular application.  We have also included
  93. two simple applications for inserting and extracting textual comments in
  94. JFIF files.
  95.  
  96. The emphasis in designing this software has been on achieving portability and
  97. flexibility, while also making it fast enough to be useful.  In particular,
  98. the software is not intended to be read as a tutorial on JPEG.  (See the
  99. REFERENCES section for introductory material.)  While we hope that the entire
  100. package will someday be industrial-strength code, much remains to be done in
  101. performance tuning and in improving the capabilities of individual modules.
  102.  
  103. We welcome the use of this software as a component of commercial products.
  104. No royalty is required, but we do ask for an acknowledgement in product
  105. documentation, as described under LEGAL ISSUES.
  106.  
  107.  
  108. LEGAL ISSUES
  109. ============
  110.  
  111. In plain English:
  112.  
  113. 1. We don't promise that this software works.  (But if you find any bugs,
  114.    please let us know!)
  115. 2. You can use this software for whatever you want.  You don't have to pay us.
  116. 3. You may not pretend that you wrote this software.  If you use it in a
  117.    program, you must acknowledge somewhere in your documentation that
  118.    you've used the IJG code.
  119.  
  120. In legalese:
  121.  
  122. The authors make NO WARRANTY or representation, either express or implied,
  123. with respect to this software, its quality, accuracy, merchantability, or
  124. fitness for a particular purpose.  This software is provided "AS IS", and you,
  125. its user, assume the entire risk as to its quality and accuracy.
  126.  
  127. This software is copyright (C) 1991, 1992, 1993, 1994, 1995, Thomas G. Lane.
  128. All Rights Reserved except as specified below.
  129.  
  130. Permission is hereby granted to use, copy, modify, and distribute this
  131. software (or portions thereof) for any purpose, without fee, subject to these
  132. conditions:
  133. (1) If any part of the source code for this software is distributed, then this
  134. README file must be included, with this copyright and no-warranty notice
  135. unaltered; and any additions, deletions, or changes to the original files
  136. must be clearly indicated in accompanying documentation.
  137. (2) If only executable code is distributed, then the accompanying
  138. documentation must state that "this software is based in part on the work of
  139. the Independent JPEG Group".
  140. (3) Permission for use of this software is granted only if the user accepts
  141. full responsibility for any undesirable consequences; the authors accept
  142. NO LIABILITY for damages of any kind.
  143.  
  144. These conditions apply to any software derived from or based on the IJG code,
  145. not just to the unmodified library.  If you use our work, you ought to
  146. acknowledge us.
  147.  
  148. Permission is NOT granted for the use of any IJG author's name or company name
  149. in advertising or publicity relating to this software or products derived from
  150. it.  This software may be referred to only as "the Independent JPEG Group's
  151. software".
  152.  
  153. We specifically permit and encourage the use of this software as the basis of
  154. commercial products, provided that all warranty or liability claims are
  155. assumed by the product vendor.
  156.  
  157.  
  158. ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
  159. sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
  160. ansi2knr.c is NOT covered by the above copyright and conditions, but instead
  161. by the usual distribution terms of the Free Software Foundation; principally,
  162. that you must include source code if you redistribute it.  (See the file
  163. ansi2knr.c for full details.)  However, since ansi2knr.c is not needed as part
  164. of any program generated from the IJG code, this does not limit you more than
  165. the foregoing paragraphs do.
  166.  
  167. The configuration script "configure" was produced with GNU Autoconf.  It
  168. is copyright by the Free Software Foundation but is freely distributable.
  169.  
  170. It appears that the arithmetic coding option of the JPEG spec is covered by
  171. patents owned by IBM, AT&T, and Mitsubishi.  Hence arithmetic coding cannot
  172. legally be used without obtaining one or more licenses.  For this reason,
  173. support for arithmetic coding has been removed from the free JPEG software.
  174. (Since arithmetic coding provides only a marginal gain over the unpatented
  175. Huffman mode, it is unlikely that very many implementations will support it.)
  176. So far as we are aware, there are no patent restrictions on the remaining
  177. code.
  178.  
  179. WARNING: Unisys has begun to enforce their patent on LZW compression against
  180. GIF encoders and decoders.  You will need a license from Unisys to use the
  181. included rdgif.c or wrgif.c files in a commercial or shareware application.
  182. At this time, Unisys is not enforcing their patent against freeware, so
  183. distribution of this package remains legal.  However, we intend to remove
  184. GIF support from the IJG package as soon as a suitable replacement format
  185. becomes reasonably popular.
  186.  
  187. We are required to state that
  188.     "The Graphics Interchange Format(c) is the Copyright property of
  189.     CompuServe Incorporated.  GIF(sm) is a Service Mark property of
  190.     CompuServe Incorporated."
  191.  
  192.  
  193. REFERENCES
  194. ==========
  195.  
  196. We highly recommend reading one or more of these references before trying to
  197. understand the innards of the JPEG software.
  198.  
  199. The best short technical introduction to the JPEG compression algorithm is
  200.     Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
  201.     Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
  202. (Adjacent articles in that issue discuss MPEG motion picture compression,
  203. applications of JPEG, and related topics.)  If you don't have the CACM issue
  204. handy, a PostScript file containing a revised version of Wallace's article
  205. is available at ftp.uu.net, graphics/jpeg/wallace.ps.gz.  The file (actually
  206. a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
  207. omits the sample images that appeared in CACM, but it includes corrections
  208. and some added material.  Note: the Wallace article is copyright ACM and
  209. IEEE, and it may not be used for commercial purposes.
  210.  
  211. A somewhat less technical, more leisurely introduction to JPEG can be found in
  212. "The Data Compression Book" by Mark Nelson, published by M&T Books (Redwood
  213. City, CA), 1991, ISBN 1-55851-216-0.  This book provides good explanations and
  214. example C code for a multitude of compression methods including JPEG.  It is
  215. an excellent source if you are comfortable reading C code but don't know much
  216. about data compression in general.  The book's JPEG sample code is far from
  217. industrial-strength, but when you are ready to look at a full implementation,
  218. you've got one here...
  219.  
  220. The best full description of JPEG is the textbook "JPEG Still Image Data
  221. Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published
  222. by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.  Price US$59.95, 638 pp.
  223. The book includes the complete text of the ISO JPEG standards (DIS 10918-1
  224. and draft DIS 10918-2).  This is by far the most complete exposition of JPEG
  225. in existence, and we highly recommend it.
  226.  
  227. The JPEG standard itself is not available electronically; you must order a
  228. paper copy through ISO.  (Unless you feel a need to own a certified official
  229. copy, we recommend buying the Pennebaker and Mitchell book instead; it's much
  230. cheaper and includes a great deal of useful explanatory material.)  In the US,
  231. copies of the standard may be ordered from ANSI Sales at (212) 642-4900, or
  232. from Global Engineering Documents at (800) 854-7179.  (ANSI doesn't take
  233. credit card orders, but Global does.)  It's not cheap: as of 1992, ANSI was
  234. charging $95 for Part 1 and $47 for Part 2, plus 7% shipping/handling.  The
  235. standard is divided into two parts, Part 1 being the actual specification,
  236. while Part 2 covers compliance testing methods.  Part 1 is titled "Digital
  237. Compression and Coding of Continuous-tone Still Images, Part 1: Requirements
  238. and guidelines" and has document number ISO/IEC IS 10918-1.  As of mid-1994,
  239. Part 2 is still at Draft International Standard status.  It is titled "Digital
  240. Compression and Coding of Continuous-tone Still Images, Part 2: Compliance
  241. testing" and has document number ISO/IEC DIS 10918-2.  (The document number
  242. will change to IS 10918-2 when final approval is obtained.)  A Part 3,
  243. covering extensions, is likely to appear in draft form in late 1994.
  244.  
  245. The JPEG standard does not specify all details of an interchangeable file
  246. format.  For the omitted details we follow the "JFIF" conventions, revision
  247. 1.02.  A copy of the JFIF spec is available from:
  248.     Literature Department
  249.     C-Cube Microsystems, Inc.
  250.     1778 McCarthy Blvd.
  251.     Milpitas, CA 95035
  252.     phone (408) 944-6300,  fax (408) 944-6314
  253. A PostScript version of this document is available at ftp.uu.net, file
  254. graphics/jpeg/jfif.ps.gz.  It can also be obtained by e-mail from the C-Cube
  255. mail server, netlib@c3.pla.ca.us.  Send the message "send jfif_ps from jpeg"
  256. to the server to obtain the JFIF document; send the message "help" if you have
  257. trouble.
  258.  
  259. The TIFF 6.0 file format specification can be obtained by FTP from sgi.com
  260. (192.48.153.1), file graphics/tiff/TIFF6.ps.Z; or you can order a printed copy
  261. from Aldus Corp. at (206) 628-6593.  It should be noted that the TIFF 6.0 spec
  262. of 3-June-92 has a number of serious problems in its JPEG features.  A
  263. redesign effort is currently underway to correct these problems; it is
  264. expected to result in a new, incompatible, spec.  IJG intends to support the
  265. corrected version of TIFF when the new spec is issued.
  266.  
  267.  
  268. ARCHIVE LOCATIONS
  269. =================
  270.  
  271. The "official" archive site for this software is ftp.uu.net (Internet
  272. address 192.48.96.9).  The most recent released version can always be found
  273. there in directory graphics/jpeg.  This particular version will be archived
  274. as graphics/jpeg/jpegsrc.v5b.tar.gz.  If you are on the Internet, you
  275. can retrieve files from ftp.uu.net by standard anonymous FTP.  If you don't
  276. have FTP access, UUNET's archives are also available via UUCP; contact
  277. help@uunet.uu.net for information on retrieving files that way.
  278.  
  279. Numerous Internet sites maintain copies of the UUNET files; in particular,
  280. you can probably find a copy at any site that archives comp.sources.misc
  281. submissions.  However, only ftp.uu.net is guaranteed to have the latest
  282. official version.
  283.  
  284. You can also obtain this software from CompuServe, in the GRAPHSUPPORT forum
  285. (GO GRAPHSUP), library 12 "JPEG Tools".  Again, CompuServe is not guaranteed
  286. to have the very latest version.
  287.  
  288. The JPEG FAQ (Frequently Asked Questions) article is a useful source of
  289. general information about JPEG.  It is updated constantly and therefore is
  290. not included in this distribution.  The FAQ is posted every two weeks to
  291. Usenet newsgroups comp.graphics, news.answers, and other groups.  You can
  292. always obtain the latest version from the news.answers archive at
  293. rtfm.mit.edu.  By FTP, fetch /pub/usenet/news.answers/jpeg-faq/part1 and
  294. .../part2.  If you don't have FTP, send e-mail to mail-server@rtfm.mit.edu
  295. with body
  296.     send usenet/news.answers/jpeg-faq/part1
  297.     send usenet/news.answers/jpeg-faq/part2
  298.  
  299.  
  300. RELATED SOFTWARE
  301. ================
  302.  
  303. Numerous viewing and image manipulation programs now support JPEG.  (Quite a
  304. few of them use this library to do so.)  The JPEG FAQ described above lists
  305. some of the more popular free and shareware viewers, and tells where to
  306. obtain them on Internet.
  307.  
  308. If you are on a Unix machine, we highly recommend Jef Poskanzer's free
  309. PBMPLUS image software, which provides many useful operations on PPM-format
  310. image files.  In particular, it can convert PPM images to and from a wide
  311. range of other formats.  You can obtain this package by FTP from ftp.x.org
  312. (contrib/pbmplus*.tar.Z) or ftp.ee.lbl.gov (pbmplus*.tar.Z).  There is also
  313. a newer update of this package called NETPBM, available from
  314. wuarchive.wustl.edu under directory /graphics/graphics/packages/NetPBM/.
  315. Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software
  316. is; you are likely to have difficulty making it work on any non-Unix machine.
  317.  
  318. A different free JPEG implementation, written by the PVRG group at Stanford,
  319. is available from havefun.stanford.edu in directory pub/jpeg.  This program
  320. is designed for research and experimentation rather than production use;
  321. it is slower, harder to use, and less portable than the IJG code, but it
  322. implements a larger subset of the JPEG standard.  In particular, it supports
  323. lossless JPEG.
  324.  
  325.  
  326. FILE FORMAT WARS
  327. ================
  328.  
  329. Some JPEG programs produce files that are not compatible with our library.
  330. The root of the problem is that the ISO JPEG committee failed to specify a
  331. concrete file format.  Some vendors "filled in the blanks" on their own,
  332. creating proprietary formats that no one else could read.  (For example, none
  333. of the early commercial JPEG implementations for the Macintosh were able to
  334. exchange compressed files.)
  335.  
  336. The file format we have adopted is called JFIF (see REFERENCES).  This format
  337. has been agreed to by a number of major commercial JPEG vendors, and it has
  338. become the de facto standard.  JFIF is a minimal or "low end" representation.
  339. Work is also going forward to incorporate JPEG compression into the TIFF
  340. standard, for use in "high end" applications that need to record a lot of
  341. additional data about an image.  We intend to support TIFF in the future.
  342. We hope that these two formats will be sufficient and that other,
  343. incompatible JPEG file formats will not proliferate.
  344.  
  345. Indeed, part of the reason for developing and releasing this free software is
  346. to help force rapid convergence to de facto standards for JPEG file formats.
  347. SUPPORT STANDARD, NON-PROPRIETARY FORMATS: demand JFIF or TIFF/JPEG!
  348.  
  349.  
  350. TO DO
  351. =====
  352.  
  353. In future versions, we are considering supporting progressive JPEG
  354. compression, the upcoming JPEG Part 3 extensions, and other improvements.
  355.  
  356. As always, speeding things up is high on our priority list.
  357.  
  358. Please send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net.
  359.